package com.example.yls.demoa;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;

import java.io.File;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        findViewById(R.id.btn_token).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {

                final String FilePath ="/storage/emulated/legacy"+ File.separator+"face2.jpg";
                File file = new File(FilePath);
                Log.e("MainActicity",String.valueOf(file.exists()));
                 new Thread(new Runnable() {
                    @Override
                    public void run() {
                       FaceDetect.detect(FilePath);
                   }
                }).start();

            }
        });
    }
}
